package edu.unf.cen6940.dao;

import edu.unf.cen6940.domain.Thesis;

import java.sql.Date;
import java.util.Calendar;
import java.util.Set;

import org.skyway.spring.util.dao.JpaDao;

import org.springframework.dao.DataAccessException;

/**
 * DAO to manage Thesis entities.
 * 
 */
public interface ThesisDAO extends JpaDao<Thesis> {

	/**
	 * JPQL Query - findThesisByDefenseAttempts
	 *
	 */
	public Set<Thesis> findThesisByDefenseAttempts(Integer defenseAttempts) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByDefenseAttempts
	 *
	 */
	public Set<Thesis> findThesisByDefenseAttempts(Integer defenseAttempts, int startResult, int maxRows) throws DataAccessException;

	/**
	 * JPQL Query - findAllThesiss
	 *
	 */
	public Set<Thesis> findAllThesiss() throws DataAccessException;

	/**
	 * JPQL Query - findAllThesiss
	 *
	 */
	public Set<Thesis> findAllThesiss(int startResult, int maxRows) throws DataAccessException;
	
	public int getCount() throws DataAccessException;
	public int getCount(int startResult, int maxRows) throws DataAccessException;
	/**
	 * JPQL Query - findThesisByTitleContaining
	 *
	 */
	public Set<Thesis> findThesisByTitleContaining(String title) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByTitleContaining
	 *
	 */
	public Set<Thesis> findThesisByTitleContaining(String title, int startResult, int maxRows) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByAbstract_Containing
	 *
	 */
	public Set<Thesis> findThesisByAbstract_Containing(String abstract_) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByAbstract_Containing
	 *
	 */
	public Set<Thesis> findThesisByAbstract_Containing(String abstract_, int startResult, int maxRows) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByThesisId
	 *
	 */
	public Thesis findThesisByThesisId(Integer thesisId) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByThesisId
	 *
	 */
	public Thesis findThesisByThesisId(Integer thesisId, int startResult, int maxRows) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByDoi
	 *
	 */
	public Set<Thesis> findThesisByDoi(String doi) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByDoi
	 *
	 */
	public Set<Thesis> findThesisByDoi(String doi, int startResult, int maxRows) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByStartDate
	 *
	 */
	public Set<Thesis> findThesisByStartDate(java.util.Calendar startDate) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByStartDate
	 *
	 */
	public Set<Thesis> findThesisByStartDate(Calendar startDate, int startResult, int maxRows) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByDoiContaining
	 *
	 */
	public Set<Thesis> findThesisByDoiContaining(String doi_1) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByDoiContaining
	 *
	 */
	public Set<Thesis> findThesisByDoiContaining(String doi_1, int startResult, int maxRows) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByProposalAttempts
	 *
	 */
	public Set<Thesis> findThesisByProposalAttempts(Integer proposalAttempts) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByProposalAttempts
	 *
	 */
	public Set<Thesis> findThesisByProposalAttempts(Integer proposalAttempts, int startResult, int maxRows) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByPrimaryKey
	 *
	 */
	public Thesis findThesisByPrimaryKey(Integer thesisId_1) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByPrimaryKey
	 *
	 */
	public Thesis findThesisByPrimaryKey(Integer thesisId_1, int startResult, int maxRows) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByTitle
	 *
	 */
	public Set<Thesis> findThesisByTitle(String title_1) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByTitle
	 *
	 */
	public Set<Thesis> findThesisByTitle(String title_1, int startResult, int maxRows) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByAbstract_
	 *
	 */
	public Set<Thesis> findThesisByAbstract_(String abstract__1) throws DataAccessException;

	/**
	 * JPQL Query - findThesisByAbstract_
	 *
	 */
	public Set<Thesis> findThesisByAbstract_(String abstract__1, int startResult, int maxRows) throws DataAccessException;
	
	public Set<Thesis> advancedSearch(Thesis thesis) throws DataAccessException;
	
	public Set<Thesis> advancedSearch(Thesis thesis, Date endDate) throws DataAccessException;
	
	public Set<Thesis> searchByTerm(String term) throws DataAccessException;
	
	/**
	 * Search for a Thesis By Student Id
	 * */
	public Set<Thesis> searchThesisByStudentId(String id) throws DataAccessException;
	
	/**
	 * Search for a Thesis By Category Id
	 * */
	public Set<Thesis> searchThesisByCategoryId(int id) throws DataAccessException;
	public Set<Thesis> searchThesisByChairId(String id) throws DataAccessException;

}